﻿<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="resource/lib/Utils.js"></script>
    <script src="resource/lib/BaseClass.js"></script>
    <script src="resource/lib/Circle.js"></script>
    <script src="resource/lib/Link.js"></script>
    <script src="resource/lib/Image.js"></script>
    <script src="resource/lib/Rect.js"></script>
    <script src="resource/lib/RectContainer.js"></script>
    <script src="resource/lib/Text.js"></script>
</head>

<body>
    <svg id="svg1" width="100%" height="900px" version="1.1"
        xmlns="http://www.w3.org/2000/svg">
        <defs>
            <marker id="markerArrow" markerWidth="10" markerHeight="11" refX="2" refY="6" orient="auto">
                <path d="M2,2 L2,11 L10,6 L2,2" style="fill: #000000;" />
            </marker>
        </defs>
    </svg>
</body>
</html>
<script>
    var diagram = new Diagram(document.getElementById('svg1'));

    var worker = new Worker("resource/lib/worker.js");
    worker.onmessage = function (e) {
        console.log(e.data);
    }
    
    worker.onerror = function (error) {
        console.log(error.filename + "--" + error.message + "--" + error.lineno);
    }
    var node1 = new Image({ x: 10, y: 10 }, { w: 48, h: 48 }, "resource/images/empty.png");
    var text1 = new Text({ x: 10, y: 60 }, { w: 0, h: 0 }, "timer");
    var c1 = new NodeContainer({ x: 50, y: 50 }, { w: 300, h: 300 });
    node1.addChildren(text1);
    c1.addChildren(node1);
    diagram.addElement(text1);
    diagram.addElement(c1);
    diagram.addElement(node1);
    
    
    
</script>
